.translation {
    padding: 20px 0;
    min-height: calc(100vh - 100px);
    position: relative;
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.page-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #ff6b35;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
    color: #ccc;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #ff6b35;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.error-message {
    text-align: center;
    padding: 50px;
    color: #e63946;
    background: rgba(230, 57, 70, 0.1);
    border-radius: 10px;
    margin: 20px;
}

.retry-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.translation-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    width: 100%;
    max-width: 100%;
}

.sidebar {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    height: 760px;
}

.category-list h3 {
    margin-top: 0;
    color: #ff6b35;
    border-bottom: 2px solid #ff6b35;
    padding-bottom: 10px;
}

.category-list ul {
    list-style-type: none;
    padding: 0;
    height: 660px;
    scroll-behavior: auto;
    overflow-y: scroll; /* 添加垂直滚动条 */
}

.category-list li {
    padding: 5px 5px;
    margin: 5px 0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-list li span {
    color: gold;
}

.category-list li:hover {
    background: rgba(255, 255, 255, 0.2);
}

.category-list li.active {
    background: #ff6b35;
    color: white;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background: rgba(255, 255, 255, 0.9);
}

.search-box button {
    padding: 8px 15px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-controls select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background: rgba(255, 255, 255, 0.9);
}

.sort-controls button {
    padding: 8px 15px;
    background: #4a9eff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.pagination-top,
.pagination-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
}

.pagination-info {
    font-size: 0.9rem;
    color: #ccc;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-controls button {
    padding: 8px 12px;
    background: #2a4b74;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.pagination-controls button:disabled {
    background: #555;
    cursor: not-allowed;
}

.pagination-controls button.active {
    background: #ff6b35;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.translation-table {
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
}

/* 在现有样式中添加以下内容 */
.translation-table table {
    table-layout: fixed;
    width: 100%;
}

.translation-table #file_id {
    width: 7%;
}

.translation-table #gossip_id {
    width: 7%;
}

.translation-table #content {
    width: 30%;
}

.translation-table #history {
    width: 6%;
}

.translation-table #chinese {
    width: 30%;
}

.translation-table #remark {
    width: 10%;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #444;
}

th {
    background: rgba(255, 107, 53, 0.2);
    color: #ff6b35;
    font-weight: bold;
    position: relative;
    user-select: none;
}

th.sortable {
    cursor: pointer;
}

th.sortable:hover {
    background: rgba(255, 107, 53, 0.3);
}

.sort-indicator {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    font-size: 0.7rem;
}

.sort-indicator span {
    opacity: 0.3;
    line-height: 0.7rem;
}

.sort-indicator .active {
    opacity: 1;
    color: #ff6b35;
}

tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.translation-textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #555;
    background: rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
    resize: vertical;
    font-family: inherit;
    line-height: 1.4;
}

.save-btn {
    padding: 8px 15px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.save-btn:disabled {
    background: grey;
}

.save-btn:hover {
    background: #218838;
}

/* 通知系统样式 */
.notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    width: 300px;
}

.notification {
    margin-bottom: 10px;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    background: #28a745;
    color: white;
}

.notification.error {
    background: #dc3545;
    color: white;
}

.notification.warning {
    background: #ffc107;
    color: #212529;
}

.notification-content {
    padding: 15px;
}

.notification-content strong {
    display: block;
    margin-bottom: 5px;
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.3s linear;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: #0c1a2d;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255, 107, 53, 0.2);
    border-bottom: 1px solid #444;
}

.modal-header h3 {
    margin: 0;
    color: #ff6b35;
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #ff6b35;
}

.modal-body {
    padding: 20px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.translation-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.translation-item:last-child {
    margin-bottom: 0;
}

.translation-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #ccc;
}

.translation-content {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    white-space: pre-wrap;
    line-height: 1.5;
}

/* 悬停提示样式 */
.tooltip-modal {
    position: absolute;
    background: #0c1a2d;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    min-width: 300px;
    max-width: 800px;
    max-height: 300px;
    overflow: hidden;
}

.tooltip-modal .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 12px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 60px;
    height: 30px;
    font-size: 14px;
}

.tooltip-header {
    padding: 10px 15px;
    background: rgba(255, 107, 53, 0.2);
    border-bottom: 1px solid #444;
}

.tooltip-header h4 {
    margin: 0;
    color: #ff6b35;
    font-size: 1rem;
}

.tooltip-body {
    padding: 10px;
    max-height: 250px;
    overflow-y: auto;
}

.translation-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.translation-item:last-child {
    margin-bottom: 0;
}

.translation-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.8rem;
    color: #ccc;
}

.translation-content {
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    white-space: pre-wrap;
    line-height: 1.4;
    font-size: 0.9rem;
}

.translation-container {
    height: 800px;
    padding: 20px;
    box-sizing: border-box;
}

.text-box-container {
    display: flex;
    gap: 20px;
    height: calc(100% - 40px); /* 减去padding */
}

.text-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.text-column label {
    margin-bottom: 8px;
    font-weight: bold;
}

.text-column textarea {
    flex: 1;
    min-height: 300px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: none; /* 禁止用户调整大小 */
    box-sizing: border-box;
}

.text-column textarea:focus {
    outline: none;
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .translation-content {
        grid-template-columns: 1fr;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination-top,
    .pagination-bottom {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .pagination-controls {
        justify-content: center;
    }

    .notification-container {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }

    /* 翻译人数显示样式 */
    .translation-count {
        cursor: pointer;
        padding: 4px 8px;
        border-radius: 4px;
        background-color: rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
        color: #ccc;
        /* 默认颜色 */
    }

    .translation-count:hover {
        background-color: rgba(255, 107, 53, 0.3);
        color: #ff6b35;
        /* 悬停时的颜色 */
    }

    .translation-count.has-translations {
        color: #4a9eff;
        /* 有翻译时的颜色 */
        font-weight: bold;
    }

}